package org.guohao.mockdata.utils;

import java.sql.SQLException;
import java.util.List;
import org.guohao.mockdata.constant.ManagerType;
import org.guohao.mockdata.entity.DBConnectEntity;

/**
 * Manages the history and (in the future) the projects of Everest.
 */
public interface DataManager {
    String HEADER = "Header";
    String PARAM = "Param";
    String URL_STRING = "URLString";
    String FORM_STRING = "FormString";
    String AUTH_METHOD = "AuthMethod";
    String FILE = "File";
    String BASIC = "Basic";
    String DIGEST = "Digest";
    String ID = "ID";
    List<DBConnectEntity> getDBList() throws SQLException;

    /**
     * Returns the identifier for the DataManager. Preferably, use the source as the identifier.
     * For example, a DataManager using Google Drive may identify itself as 'Google Drive'.
     */
    ManagerType getIdentifier();

    void saveConnectSetting(DBConnectEntity dbConnectInfo) throws SQLException;
}
